﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using DAL;

namespace BLL
{
    public class BPrivateCar
    {
        private readonly DPrivateCar _dPrivateCar = new DPrivateCar();

        public bool Exists(string phoneNumber)
        {
           return _dPrivateCar.Exists(phoneNumber);
        } 

        public bool Add(Model.PrivateCarInfo model)
        {
            return _dPrivateCar.Add(model);
        }
         
        public bool Update(string phoneNumber, DateTime lastLoginTime)
        {
            return _dPrivateCar.Update(phoneNumber, lastLoginTime);
        }
         
        public bool Update(Model.PrivateCarInfo model)
        {
            return _dPrivateCar.Update(model);
        }
         
        public bool DeleteById(int id)
        {
            return _dPrivateCar.DeleteById(id);
        }

        public bool DeleteByPhoneNumber(string phoneNumber)
        {
            return _dPrivateCar.DeleteByPhoneNumber(phoneNumber);
        }

        public bool DeleteByImei(string imei)
        {
            return _dPrivateCar.DeleteByImei(imei);
        }

        public Model.PrivateCarInfo GetModel(string phoneNum)
        {
            return _dPrivateCar.GetModel(phoneNum);
        }

        public DataSet GetList(string strWhere)
        {
            return _dPrivateCar.GetList(strWhere);
        }

        public bool UpdateSignatureByPhoneNumber(string phoneNumber, string signature)
        {
            return _dPrivateCar.UpdateSignatureByPhoneNumber(phoneNumber, signature);
        }
        
        public DataSet GetListByPage(int page, int pagesize, string parameter, string parameterValue)
        {
            return _dPrivateCar.GetListByPage(page, pagesize, parameter, parameterValue);
        }

        public int GetCount(string parameter, string parameterValue)
        {
            return _dPrivateCar.GetCount(parameter, parameterValue);
        }


        public bool UpdateCarInfoByPhoneNumber(Model.PrivateCarInfo model)
        {
            return _dPrivateCar.UpdateCarInfoByPhoneNumber(model);
        }

        public DataSet GetPhoneNumberList(string strWhere)
        {
            return _dPrivateCar.GetPhoneNumberList(strWhere);
        }

    }
}
